package c09_stream_middle_method;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Student11 {
    private String name;
    private int age;
    private double score;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student11 student11 = (Student11) o;
        return Objects.equals(name, student11.name);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(name);
    }
}
